﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/UserHome.Master" CodeBehind="Tags.aspx.vb" Inherits="LEAD.Tags" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <tr>
        <td style="width:100%">
            <form id="form1" runat="server">
            <table width="100%">
            <tr>
            <td style="width:25%">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                DataSourceID="SqlDataSource1" Height="182px" Width="67px" GridLines="None">
                <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="TagID" 
            DataNavigateUrlFormatString="Tags.aspx?id={0}" 
            DataTextField="TagName" HeaderText="Tags" 
            SortExpression="TagName" >
            <ControlStyle Width="200px" />
            <HeaderStyle Width="200px" />
            <ItemStyle HorizontalAlign="Center" />
        </asp:HyperLinkField>
                </Columns>
            </asp:GridView>
            
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                SelectCommand="SELECT [TagName], [TagID] FROM [Tags] ORDER BY [TagName]">
            </asp:SqlDataSource>
            </td>
            <td>
            <table>
            <tr>
            <td style='border: thick solid red; text-align:center;'>
                    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
                DataSourceID="SqlDataSource2" GridLines="None">
            <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="ActionID" 
            DataNavigateUrlFormatString="Details.aspx?ActionID={0}" 
            DataTextField="Title" HeaderText="Title" 
            SortExpression="Title" >
            <ControlStyle Width="200px" />
            <HeaderStyle Width="200px" />
            <ItemStyle HorizontalAlign="Center" />
                </asp:HyperLinkField>
                <asp:BoundField DataField="Image" HeaderText="Image" SortExpression="Image" />
                <asp:BoundField DataField="Count_page" HeaderText="Count_page" 
                    SortExpression="Count_page" />
                <asp:BoundField DataField="AddedDate" HeaderText="AddedDate" 
                    SortExpression="AddedDate" />
            </Columns>

            </asp:GridView>
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                        SelectCommand="SELECT MT.Title, MT.[Image], MT.ActionID, MT.Count_page, MT.AddedDate FROM (MasterTable MT INNER JOIN TagContent TC ON MT.ActionID = TC.ActionID_FK) WHERE (TC.TagID_FK = ?)">
                        <SelectParameters>
                            <asp:QueryStringParameter Name="?" QueryStringField="ID" />
                        </SelectParameters>
                    </asp:SqlDataSource>
            </td>
            </tr>
            
            </table>
            </td>
            
            </tr>
            </table>
            </form>
        
        </td>
    </tr>
</asp:Content>
